<template>
  <div class="h-100">
    <div class="app-top" :style="{ height: heightCen + '%' }">
      <div class="text" v-text="text" />
    </div>
    <div :style="{ height: 100 - heightCen + '%' }">
      <slot />
    </div>
  </div>
</template>

<script>
export default {
  props: {
    ph: {
      type: Number,
      default: 800
    },
    text: String
  },
  computed: {
    heightCen() {
      // return ((41 / this.ph) * 100).toFixed(2)
      // spkart
      return ((41 / 1400) * 100).toFixed(2)
    }
  }
}
</script>

<style lang="scss" scoped>
.app-top {
  width: 100%;
}
.rectangle {
  background: url(~@/assets/img/rectangle.png) no-repeat;
  background-size: 100% 100%;
  width: 100%;
  height: 3px;
}
.text {
  font-size: 20px;
  color: #fff;
  line-height: 38px;
  font-weight: 500;
}
</style>
